//
//  SAMyAccountModifyPasswordCell.m
//  yidiantong
//
//  Created by 黄志刚 on 2020/10/9.
//

#import "SAMyAccountModifyPasswordCell.h"

@interface SAMyAccountModifyPasswordCell ()

@property (nonatomic, strong) UIImageView *arrowImageV;

@end

@implementation SAMyAccountModifyPasswordCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self initUI];
    }
    return self;
}

#pragma mark - initUI

- (void)initUI {

    [self.contentView addSubview:self.titleLab];
    [self.contentView addSubview:self.arrowImageV];
    [self.contentView addSubview:self.contentLab];
    
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(30);
        make.centerY.mas_equalTo(0);
    }];
    
    [self.arrowImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-30);
        make.centerY.mas_equalTo(0);
        make.size.mas_equalTo(CGSizeMake(7, 13));
    }];
    
    [self.contentLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.arrowImageV.mas_left).offset(-5);
        make.centerY.mas_equalTo(0);
    }];
}

#pragma mark - lazy init

- (UILabel *)titleLab {
    if (!_titleLab) {
        _titleLab = [[UILabel alloc] init];
        _titleLab.font = [UIFont systemFontOfSize:16];
        _titleLab.textColor = kBlackColor;
        _titleLab.text = @"修改密码";
    }
    return _titleLab;
}

-(UILabel *)contentLab {
    if (!_contentLab) {
        _contentLab = [[UILabel alloc] init];
        _contentLab.font = [UIFont systemFontOfSize:16];
        _contentLab.textColor = kBlackColor;
        _contentLab.text = @"谨慎操作";
    }
    return _contentLab;
}

- (UIImageView *)arrowImageV {
    if (!_arrowImageV) {
        _arrowImageV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Sale_rightArrow"]];
    }
    return _arrowImageV;
}

@end
